<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>应付账款列表</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:150px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		var actflg="{:C('URL_MODEL')}"=="0"?"&":"?";
		
		function selectall_todo()
		{
			$("input[name='chk_list']").attr("checked",true);
		}
		function selectall_undo()
		{
			$("input[name='chk_list']").attr("checked",false);
		}
	</script>
</head>
<body class="">
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div>应付账款列表：如果有负数，表示有预付款</div>
		<div>
		<form id="frm_search" method="post" action="{:U('Finance/ap_list')}" style="margin:10px auto 0px 25px;">
		供应商：<input type="text" id="keywords" name="keywords" class="input" value="{$keywords}" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-search" onclick="$('#frm_search').submit();">搜索</a>
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-add"  onclick="parent.addTab('往来付款','{:U('Finance/fa_checkout_add')}')">新增付款</a>
		</form>
		</div>
	</div>
	
	<div class=" space-out-10px">
	
	<div class="list-title">
		<div class="list-t-l w300px">供应商</div>
		<div class="list-t-l w100px">货币</div>
		<div class="list-t-l w100px">原币应付</div>
		<div class="list-t-l w100px">应付金额</div>
		<div class="list-t-r">
		<a href="{:U('Finance/ap_list')}" class="easyui-linkbutton" iconCls="icon-reload">刷新</a>
		</div>
	</div>
	
	<div class="list-box">
	<php>$open_amount_total=0;</php>
	<volist name="datalist" id="datalist">
	<div class="list-body">
		<div class="list-t-l w300px">{$datalist.supplier_title}</div>
		<div class="list-t-l w100px">{$datalist.curr_code}</div>
		<div class="list-t-l w100px">{$datalist.curr_open_amount|get_round=###,2}</div>
		<div class="list-t-l w100px">{$datalist.open_amount|get_round=###,2}</div>		
	</div>
	<php>$open_amount_total += (double)$datalist['open_amount'];</php>
	</volist>
	</div>
	
	<div class="list-title">
		<div class="list-t-l"><b>总计应付金额：<php>echo get_round($open_amount_total,2);</php>&nbsp;&nbsp;&nbsp;&nbsp;</b></div>
		<div class="list-t-r">
		<a href="{:U('Finance/ap_list')}" class="easyui-linkbutton" iconCls="icon-reload">刷新</a>
		</div>
	</div>
	
	</div>
	
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div class="pages">&nbsp;{$page}</div>
	</div>
</body>
</html>
